(function() {
    'use strict';
    
    function init() {
        console.log('脚本已加载');
        
        const testDiv = document.createElement('div');
        testDiv.style.position = 'fixed';
        testDiv.style.top = '10px';
        testDiv.style.right = '6px';
        testDiv.style.padding = '10px';
        testDiv.style.background = 'red';
        testDiv.style.color = 'white';
        testDiv.style.zIndex = '9999';
        testDiv.style.cursor = 'pointer';
        testDiv.style.borderRadius = '8px';
        testDiv.textContent = '×遮挡广告';

        document.body.appendChild(testDiv);
        
        testDiv.addEventListener('click', function() {
          // const vipBox = document.querySelector('#vip-box');
          // const modal = document.querySelector('.v-modal');
          // if (vipBox) vipBox.style.setProperty('top', '99999px');
          // if (modal) modal.style.setProperty('top', '99999px');
          const style = document.createElement('style');
          style.type = 'text/css';
          style.textContent = '.v-modal {top: 9999px!important;opacity: 0;pointer-events: none;}#pleasePrNotCrack {top: 9999px!important;opacity: 0;pointer-events: none;}';
          document.head.appendChild(style);
        });
    }

    // 使用多种方式确保脚本执行
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', init);
    } else {
        init();
    }
})();
